<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>计算器</title>
    <base th:href="@{/}">
    <link rel="stylesheet" type="text/css" href="calc.css">
    <style type="text/css">
        table {
            border: 1px solid black;
            text-align: center;
            border-collapse: collapse;
        }

        table thead th {
            border: 1px solid black;
        }

        table tbody td {
            border: 1px solid black;
        }
    </style>
</head>
<meta charset="UTF-8">
<body>
<div id="div2">
    <a th:href="@{/question/index}">计算器 <a/>
</div>
<table cellpadding="0" cellspacing="0">
    <div id="div1">
        <thead>
        <th>序号</th>
        <th width="300">计算过程</th>
        <th width="500">计算结果</th>
        <th width="200"></th>
        </thead>
        <tbody>
        <tr th:each="entries,stat:${resultList}" th:style="'background-color:'+@{${stat.odd}?'#F2F2F2'}">
            <td th:text="${stat.count}"></td>
            <td th:text="${entries['content']}"></td>
            <td th:text="${entries['result']}"></td>
            <td><a th:href="@{'/question/delete/'+${entries['id']}}"> delete </a></td>
        </tr>
        </tbody>
    </div>
</table>
</body>
</html>
